<?php
namespace App\Amqp\Consumer;
use App\Service\CryptService;
use App\Service\Jwt;
use Hyperf\Di\Annotation\Inject;
use Hyperf\RpcServer\Annotation\RpcService;
use PhpAmqpLib\Message\AMQPMessage;
use Swoole\Exception;

/**
 * @RpcService(name="RabbitMqExceptionConsumerService", protocol="jsonrpc-http", server="jsonrpc-http", publishTo="consul")
 */
class RabbitMqExceptionConsumerService
{
    public $connection;     //链接
    public $channel;        //信道

    public $exchangeName = '';     //交换机名
    public $queueName = '';        //队列名
    public $routeKey = '';         //路由键
    public $exchangeType = 'direct';    //交换机类型

    public $autoAck = true; //是否自动ack应答

//    public function __construct(string $exchangeName, string $queueName, string $routeKey, string $exchangeType = 'direct', array $config = [])
//    {
//        parent::__construct($exchangeName, $queueName, $routeKey, $exchangeType, $config);
//    }

    public function doProcess($msg)
    {
        echo $msg.'_Publisher' . "\n";
    }
}